<template>
	<view style="margin: 100rpx 50rpx auto;">
		<view class="text-area">
			<text>输入值：</text>
			<input type="text" v-model="title" style="color: red; background-color: darkgray;" />
		</view>
		<view class="text-area">
			<text>回传值：</text>
			<input type="text" :value="callBackValue" style="color: yellow; background-color: darkgray;" />
		</view>
		<comA :intent="title"></comA>
		<comB @callBackFun="callBack"></comB>
	</view>
</template>

<script>
	import comA from '../../../components/compA.vue'
	import comB from '../../../components/compB.vue'
	export default {
		components: {
			comA,
			comB
		},
		data() {
			return {
				title:this.title,
				callBackValue:' '
			} 
		},
		methods: {
			callBack(msg) {
				console.warn('---index---callBack-->' + msg);
				this.callBackValue = msg;
			},
		}
	}
</script>
<style>
	.text-area {
		display: flex;
		margin-top: 20rpx;
	}
</style>